  function queryLotteryDataForm(pageIndex,pageSize)
  {
          var url =base+"/lotteryData/pagingLotteryData.do?pageIndex="+pageIndex+"&pageSize="+pageSize;
          var params =jQuery("#queryForm").serialize();
          params=decodeURIComponent(params,true); 
          jQuery("#lotteryContent").load(url+"&"+ encodeURI(encodeURI(params)));
  }


  function gotoPage(pageSize)
  {
        var pageIndex =jQuery("#pageIndex").val();
        queryLotteryDataForm(pageIndex,pageSize);
  }


  function updateLotteryTime(id)
  {
     var time =jQuery("#lotteryTime-"+id).val();
      $.ajax({
        type: "POST",
        url: base+"/lotteryTime/updateLotteryTime.do",  
        data: {lotteryId:id,lotteryTime:time}, 
        success: function(data){ 
            var data=eval("("+data+")");
                if(data.STATUS==0)
                {
                     alert("修改成功!");
                     return ;
                }
                alert(data.MSG);  
         } 
        }
    );  
  }


  function manualDrawing(id)
  {
           var url=base+"/lotteryData/toManualDrawing.do?id="+id;
           jQuery.layer({
           type: 2,
           border: [0],
           title: false,
           shadeClose: true,
           closeBtn: true,
           iframe: {src : url},
           area: ['400px' , '250px']
          }); 
  }

   //手动开奖
   function saveLotteryData()
   {
         jQuery("#lotteryDataForm").ajaxSubmit(
           {
              type:"post",
              clearForm: true,        // 是否清空form  
              resetForm: true,       // 是否重置form  
              success:function(data)
              { 
                 var d= eval("("+data+")");
                 if(d.STATUS=="0")
                 {
                    alert("保存成功!"); 
                    window.parent.queryLotteryDataForm(1,15);
                    closeWin(); 
                 }
                 else
                 {
                    alert(d.MSG);
                 }
              }
           }
          );
   }

   jQuery(function()
    {
          queryLotteryDataForm(1,15);
    } 
    );